/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author adama
 */
@Embeddable
public class RelationvideoplaylistPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idRelationVideoPlaylist")
    private int idRelationVideoPlaylist;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idVideo")
    private int idVideo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idPlaylist")
    private int idPlaylist;

    public RelationvideoplaylistPK() {
    }

    public RelationvideoplaylistPK(int idRelationVideoPlaylist, int idVideo, int idPlaylist) {
        this.idRelationVideoPlaylist = idRelationVideoPlaylist;
        this.idVideo = idVideo;
        this.idPlaylist = idPlaylist;
    }

    public int getIdRelationVideoPlaylist() {
        return idRelationVideoPlaylist;
    }

    public void setIdRelationVideoPlaylist(int idRelationVideoPlaylist) {
        this.idRelationVideoPlaylist = idRelationVideoPlaylist;
    }

    public int getIdVideo() {
        return idVideo;
    }

    public void setIdVideo(int idVideo) {
        this.idVideo = idVideo;
    }

    public int getIdPlaylist() {
        return idPlaylist;
    }

    public void setIdPlaylist(int idPlaylist) {
        this.idPlaylist = idPlaylist;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idRelationVideoPlaylist;
        hash += (int) idVideo;
        hash += (int) idPlaylist;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RelationvideoplaylistPK)) {
            return false;
        }
        RelationvideoplaylistPK other = (RelationvideoplaylistPK) object;
        if (this.idRelationVideoPlaylist != other.idRelationVideoPlaylist) {
            return false;
        }
        if (this.idVideo != other.idVideo) {
            return false;
        }
        if (this.idPlaylist != other.idPlaylist) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.RelationvideoplaylistPK[ idRelationVideoPlaylist=" + idRelationVideoPlaylist + ", idVideo=" + idVideo + ", idPlaylist=" + idPlaylist + " ]";
    }
    
}
